﻿<UserControl
    x:Class="BioPatMLEditor.PatternControls.PatternRepository"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    xmlns:common  ="clr-namespace:System.Windows;assembly=System.Windows.Controls"
    xmlns:controls="clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls" 
    xmlns:controlsToolkit="clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls.Toolkit"
    mc:Ignorable="d"
    Width="250" Height="550">
	<UserControl.Resources>
		<Storyboard x:Name="BlinkingAction">
			<DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="txtLoading">
				<EasingDoubleKeyFrame KeyTime="0:0:0.5" Value="0.5"/>
				<EasingDoubleKeyFrame KeyTime="0:0:1" Value="1"/>
				<EasingDoubleKeyFrame KeyTime="0:0:1.5" Value="0.5"/>
				<EasingDoubleKeyFrame KeyTime="0:0:2" Value="1"/>
				<EasingDoubleKeyFrame KeyTime="0:0:2.5" Value="0.5"/>
				<EasingDoubleKeyFrame KeyTime="0:0:3" Value="1"/>
				<EasingDoubleKeyFrame KeyTime="0:0:3.5" Value="0.5"/>
				<EasingDoubleKeyFrame KeyTime="0:0:4" Value="1"/>
				<EasingDoubleKeyFrame KeyTime="0:0:4.5" Value="0.5"/>
				<EasingDoubleKeyFrame KeyTime="0:0:5" Value="1"/>
				<EasingDoubleKeyFrame KeyTime="0:0:5.5" Value="0.5"/>
				<EasingDoubleKeyFrame KeyTime="0:0:6" Value="1"/>
				<EasingDoubleKeyFrame KeyTime="0:0:6.5" Value="0.5"/>
				<EasingDoubleKeyFrame KeyTime="0:0:7" Value="1"/>
				<EasingDoubleKeyFrame KeyTime="0:0:7.5" Value="0.5"/>
				<EasingDoubleKeyFrame KeyTime="0:0:8" Value="1"/>
				<EasingDoubleKeyFrame KeyTime="0:0:8.5" Value="0.5"/>
				<EasingDoubleKeyFrame KeyTime="0:0:9" Value="1"/>
				<EasingDoubleKeyFrame KeyTime="0:0:9.5" Value="0.5"/>
				<EasingDoubleKeyFrame KeyTime="0:0:10" Value="1"/>
			</DoubleAnimationUsingKeyFrames>
		</Storyboard>
	</UserControl.Resources>

    <Grid x:Name="LayoutRoot" HorizontalAlignment="Left">
        <ScrollViewer Grid.Column="0" HorizontalScrollBarVisibility="Auto" VerticalScrollBarVisibility="Auto" BorderThickness="1">
            <Canvas Width="240" Margin="0,0,0,0" HorizontalAlignment="Left">
                <Border Height="487" Width="200" Canvas.Left="20" Canvas.Top="35" BorderThickness="3" CornerRadius="5" BorderBrush="#FFA25012">
                    <Border BorderBrush="#FFA25012" BorderThickness="0">
                        <controlsToolkit:TreeViewDragDropTarget>
                        <controls:TreeView 
                          x:Name="TreeOfLife" SelectedValuePath="Classification"
                          Margin="0,45,0,0" Background="{x:Null}" HorizontalAlignment="Left" VerticalAlignment="Top" Height="430" Foreground="White" Cursor="Hand" BorderBrush="{x:Null}">
                            <controls:TreeView.OpacityMask>
                                <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
                                    <GradientStop Color="Black" Offset="0"/>
                                    <GradientStop Color="White" Offset="1"/>
                                </LinearGradientBrush>
                            </controls:TreeView.OpacityMask>
                            <controls:TreeView.ItemTemplate>
                                <common:HierarchicalDataTemplate ItemsSource="{Binding Subclasses}">
                                    <StackPanel>
                                        <TextBlock Text="{Binding Rank}" FontSize="8" FontStyle="Italic" Foreground="Gray" Margin="0 0 0 -5" />
                                        <TextBlock Text="{Binding Classification}" />
                                    </StackPanel>
                                </common:HierarchicalDataTemplate>
                            </controls:TreeView.ItemTemplate>
                        </controls:TreeView>
                      </controlsToolkit:TreeViewDragDropTarget>
                    </Border>
                </Border>
                <TextBlock x:Name="txtLoading" Foreground="Red" Text="Loading..." Canvas.Top="95" Canvas.Left="76" FontSize="18.667"></TextBlock>
                <TextBlock Height="41" Width="192" Canvas.Top="40" FontSize="13.333" FontStyle="Italic" Foreground="#FFD6D6D6" Text="Predefined Pattern" TextWrapping="Wrap" FontWeight="Bold" Canvas.Left="40"/>
            </Canvas>
        </ScrollViewer>
    </Grid>
</UserControl>
